import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm'

@Entity()
export default class Post {
  @PrimaryGeneratedColumn()
  id: number

  @Column({
    type: 'longtext',
  })
  content: string

  @Column()
  post_by: number

  @CreateDateColumn({
    type: 'timestamp',
  })
  created_at: Date

  @UpdateDateColumn({
    type: 'timestamp',
  })
  updated_at: Date
}
